/*LeftSidebar.module.css*/
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    height: 100vh;
    color: white;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transition: width 0.3s ease;
    border-radius: 0 20px 0 0;
    margin-top: 30px;
    margin-right: 30px;
}

/* 新增：折叠状态下的侧边栏样式 */
.sidebar.collapsed {
    width: 64px;
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .category-title,
.sidebar.collapsed .item-text {
    display: none;
}

.sidebar.collapsed .sidebar-title::before {
    margin-right: 0;
}

.sidebar.collapsed .menu-item,
.sidebar.collapsed .category-header {
    justify-content: center;
    padding: 10px 0;
}

.sidebar.collapsed .category-items {
    padding-left: 0;
}

.sidebar.collapsed .menu-item {
    margin-right: 0;
    border-radius: 8px;
}

.sidebar-header {
    padding: 20px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 新增：折叠按钮样式 */
.sidebar-toggle {
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.sidebar-toggle:hover {
    opacity: 1;
}

.sidebar-title {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.sidebar-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background-color: #3498db;
    margin-right: 10px;
    border-radius: 2px;
}

.sidebar-menu {
    padding: 15px 0;
}

.menu-category {
    margin-bottom: 20px;
}

.category-header {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.category-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    color: #3498db;
}

.category-title {
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-items {
    padding-left: 15px;
}

.menu-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-radius: 8px 0 0 8px;
    margin-right: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.menu-item.active {
    background-color: #3498db;
    color: white;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.4);
}

.item-icon {
    width: 18px;
    height: 18px;
    margin-right: 12px;
}

.item-text {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.icon {
    width: 30px;
    height: 30px;
}